package Main;

import java.io.*;

public class Try2 {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Users\\ruanjie\\Desktop\\sortList.txt");

        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file)));

        for (int i=0;i<2021;i++){
            writer.write(String.valueOf(i));
            writer.newLine();
        }

        writer.close();

    }
}
